package com.jiaai.cloud.wx.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.jiaai.cloud.wx.entity.TWxshop;
import com.jiaai.cloud.wx.mapper.TWxshopMapper;
import com.jiaai.cloud.wx.service.ITWxshopService;
import com.jiaai.cloud.wx.service.ITWxuserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 佳爱网络科技
 * @since 2017-08-22
 */
@Service
public class TWxshopServiceImpl extends ServiceImpl<TWxshopMapper, TWxshop> implements ITWxshopService {

    @Autowired
    private TWxshopMapper tWxshopMapper;

    @Override
    public TWxshop selectShopGoods(Integer shopid) {
        return tWxshopMapper.selectShopGoods(shopid);
    }


    @Override
    @Transactional
    public void insertUserShop(Integer userid, Integer shopid) {
        tWxshopMapper.insertUserShop(userid, shopid);
    }

    @Override
    public void deleteUserShop(Integer shopid) {
        tWxshopMapper.deleteUserShop(shopid);
    }

    @Override
    public void deleteShopGoodss(Integer shopid) {
        tWxshopMapper.deleteShopGoodss(shopid);
    }

    @Override
    public List<Integer> selectGoodsids(Integer shopid) {
        return tWxshopMapper.selectGoodsids(shopid);
    }
}
